package com.situ.mall.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.situ.mall.entity.Category;

public interface CategoryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    int insertSelective(Category record);

    Category selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);

//自己写的
    //product的添加      获取 category' service&mapper层 获取 一级和二级分类********
	List<Category> getTopCategoryList();
    List<Category> selectSecondCategoryByTopCategoryId(Integer topCategoryId);
    
//后台back
    //0.测试查找所有
	List<Category> selectAll();

	//1.展示页面信息
	int getTotalCount();
	List<Category> selectByPage(@Param(value = "offset")Integer offset, @Param(value = "limit")Integer limit);

	//echarts统计数量
	List<Category> getCategoryCount();
	
//前台front
	//1.获取二级分类 （全部）
	List<Category> getSecondCategoryList();



	




}